# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=argus
pkgver=3.0.8.2
pkgrel=7
groups=('blackarch' 'blackarch-networking' 'blackarch-defensive'
        'blackarch-sniffer')
pkgdesc='Network monitoring tool with flow control.'
arch=('x86_64' 'aarch64')
url='http://qosient.com/argus/'
depends=('zlib' 'bash' 'perl' 'libpcap' 'libsasl')
license=('GPL3')
source=("http://qosient.com/argus/src/$pkgname-$pkgver.tar.gz")
sha512sums=('146795880d8697e065ed23d2fbab226846d55db0b71945c5a4cab2896e48ceb6e1671ccb4e00dc3b0f984525bac4ced3773f3b9e70c3ea5f7c6972fe9bd94313')

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc \
    --localstatedir=/var --mandir=/usr/share/man --docdir=/usr/share/doc/argus \
    --pdfdir=/usr/share/argus/pdf --with-sasl

  make
}

package() {
  cd "$pkgname-$pkgver"

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"

  make DESTDIR="$pkgdir" install

  mv "$pkgdir/usr/$pkgname" "$pkgdir/usr/share"
}

